package com.geek.service;

import com.geek.bean.data.CouponExchangeData;
import com.geek.model.MarketCoupon;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

public interface CouponService {
    List<Map> couponList(Integer userId,int page, int limit);
    List<MarketCoupon> list(int page, int limit);

    CouponExchangeData exchange(String code);

    MarketCoupon selectById(Integer id);
    int getAvailableCouponLength(Integer userId);

    MarketCoupon findById(Integer couponId);
    Integer countById(Integer userId);

    Boolean isPossess(int userId, Integer couponId);
    MarketCoupon findsById(Integer couponId, BigDecimal sum);

}
